package home.conta.list;

import home.conta.divida.Divida;

import java.util.Comparator;

public class ValorComparator implements Comparator<Divida> {
    public int compare(Divida d1, Divida d2) {
       //possibly check for nulls to avoid NullPointerException
       return ((Double) d1.getValor()).compareTo((Double) d2.getValor());
    }
}
